<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        [title] { /* 选中具有title属性的元素 */
            color: red;
        }

        [title="aa"] { /* 选中具有title属性的元素，并且属性值为aa的元素 */
            color: blue;
        }
    </style>
</head>

<body>
    <div title="aa">A</div>
    <div title="bb">B</div>
    <div title="cc">C</div>
    <div title="cdd">D</div>
</body>

</html>